#include <wx/dialog.h>
#include <wx/button.h>
#include <wx/textctrl.h>
#include <wx/stattext.h>
#include <wx/radiobox.h>
#include <wx/listctrl.h>
#include <wx/spinctrl.h>
#include <wx/sizer.h>
#include <wx/checkbox.h>
#include "DataServer.h"

class AddItemDialog : public wxDialog
{
public:
	AddItemDialog(wxWindow* parent);
	~AddItemDialog();
	examItemData getExamItem();
private:
	examItemData newItem;

	wxTextCtrl* txtTitle;
	wxRadioBox* radioType;
	wxButton* btnAddExamItem;
	wxButton* btnDelExamItem;
	wxButton* btnGetItem;
	wxButton* btnSetItem;
	wxTextCtrl* txtItemTitle;
	wxSpinCtrlDouble* spinItemExam;
	wxListCtrl* listSelectItem;
	wxButton* btnCancel;
	wxButton* btnAddNext;
	wxCheckBox* chkExamItem;
	
	void onClick_btnAddExamItem(wxCommandEvent& event);
	void onClick_btnDelExamItem(wxCommandEvent& event);
	void onClick_btnAddNext(wxCommandEvent& event);
	void onClick_btnGetItem(wxCommandEvent& event);
	void onClick_btnSetItem(wxCommandEvent& event);

	wxDECLARE_EVENT_TABLE();
};

enum class AddItemDialogID :int
{
	txtTitle,
	radioType,
	btnAddExamItem,
	btnDelExamItem,
	txtItemTitle,
	spinItemExam,
	listSelectItem,
	btnAddNext,
	btnGetItem,
	btnSetItem,
	chkExamItem
};